/**
 * 
 */
package com.jxc.util;

/**
 * @author Tino
 * 
 */
public enum ListType {
	/**
	 * 库存盘点单
	 */
	Checklist("BD"),

	/**
	 * 库存报损单
	 */
	Damagelist("BS"),

	/**
	 * 库存调拔单
	 */
	Transferlist("DB"),

	/**
	 * 入库单
	 */
	Orderlist("RK"),

	/**
	 * 入库退货单
	 */
	OrderReturnlist("RKTH"),

	/**
	 * 销售单
	 */
	Salelist("XS"),

	/**
	 * 销售退货单
	 */
	SaleReturnlist("XSTH"),
	
	/**
	 * 会员
	 */
	Member("HY");

	private ListType(String sign) {
		this.sign = sign;
	}

	private String sign;

	public String getSign() {
		return sign;
	}

	public void setSign(String sign) {
		this.sign = sign;
	}

	public static ListType fromSign(String sign) {
		for (ListType lt : ListType.values()) {
			if (lt.getSign().equals(sign))
				return lt;
		}
		return null;
	}

	@Override
	public String toString() {
		return this.sign;
	}

	public static void main(String[] args) {
		for (ListType lt : ListType.values()) {
			System.out.println(lt.getSign());
		}

		System.out.println(ListType.Checklist.getDeclaringClass());

		System.out.println(ListType.valueOf("Salelist"));
	}

}
